Resolver: split module resolutions into local and external resolutions - #160099
Resolver: split module resolutions into local and external resolutions#160099LorrensP-2158466 wants to merge 1 commit into
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…<try> Resolver: split module resolutions into local and external resolutions
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5fd6574): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -1.4%, secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 490.165s -> 490.132s (-0.01%) |
|
Increased cycle count is expected due to |
|
|
| } | ||
|
|
||
| type Resolutions<'ra> = CmRefCell<FxIndexMap<BindingKey, NameResolutionRef<'ra>>>; | ||
| type ResolutionTable<'ra> = CmRefCell<FxIndexMap<BindingKey, NameResolutionRef<'ra>>>; |
There was a problem hiding this comment.
The extern version of the table doesn't need CmRefCell, because it's never mutated.
But you'll have to either dismantle fn resolutions, or introduce something like CmRef to avoid it.
There was a problem hiding this comment.
I'll try it next.
|
r=me after addressing #160099 (comment). |
|
Reminder, once the PR becomes ready for a review, use |
… having a `OnceLock` around it for parallel import resolution
7a2d086 to
580253e
Compare
Can't do that :D, @rustbot ready. |
|
@bors r+ rollup |
Part of #158845.
This pr splits the resolution table for local and external modules, with the external table being wrapped in a
OnceLock, because only 1 thread may create that table in parallel resolution.r? @petrochenkov